main(n,t,r)
{
	unsigned long long a;
	for(gets(&n);~scanf("%d%d",&r,&n);printf("%llu\n",a))
	{
		for(a=1,t=r;r--;a*=n--);
		for(;t;a/=t--);
	}
}
